#include <iostream>
#include <string>
std::string recommendSize(int height) {
    if (height <= 150) return "S";
    if (height <= 160) return "M";
    if (height <= 170) return "L";
    if (height <= 180) return "XL";
    return "XXL";
}
int main(){
    int height; std::cin >> height;
    std::cout << recommendSize(height);
    return 0;
}